import { Module } from "@nestjs/common";
import {MailerModule} from '@nestjs-modules/mailer';
import {HandlebarsAdapter} from '@nestjs-modules/mailer/dist/adapters/handlebars.adapter';

@Module({
    imports: [
        MailerModule.forRoot({
            transport: 'smtps://user@qq.com:授权码@smtp.qq.com',
            defaults: {
                from: '"我自己" <user@qq.com>'
            },
            template: {
                dir: __dirname + '/templates',
                adapter: new HandlebarsAdapter(),
                options: {
                    strict: true
                }
            }
        })
    ]
})
export class MailModule {}